home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
MATHS
/
RLAB
/
RLAB125.ZIP
/
!RLaB
/
help_ai
/
BREAK
< prev
next >
Wrap
Text File
|
1994-06-20
|
469b
|
30 lines
BREAK:
The break statement functions similar to the C break. The
break statement provides an early exit from the enclosing for,
or while loop. For example:
> while ( i < 100 ) {
> if(i == 10) { break; }
> i++;
> }
> i
i =
10
//
// OR
//
> i=0;j=0;
> while (i < 5)
> {
> while (j < 5) { if (j == 3) { break } j++; }
> i++;
> } i j
i =
5
j =
3
See Also: CONTINUE, FOR, WHILE